﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FanucVarProxy.ClientUserControl
{
    public partial class FormNumericRegValue : Form
    {
        public FormNumericRegValue()
        {
            InitializeComponent();
        }

        private void FormNumericRegValue_Load(object sender, EventArgs e)
        {
            this.textBox_value.Text = this.RegValue.ToString();
        }

        public decimal RegValue { get; private set; } = 2;

        private void button_set_Click(object sender, EventArgs e)
        {
            bool ok = decimal.TryParse(this.textBox_value.Text.Trim(), out decimal value);
            if (ok) this.RegValue = value;
            this.Close();
        }
    }
}
